/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package app.solaris;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.TextView;

/**
 *
 * @author Frank
 */
public class ActivityObservation extends Activity {

    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle icicle) {
        
        super.onCreate(icicle);
        setContentView(R.layout.observation);    
        
        ActionBar actionBar = getActionBar();
        actionBar.show();
        
        TextView inleiding = (TextView) findViewById(R.id.inleiding);
        String inleidingTekst = "Solaris, Blauwe sterrenwacht \n\n Deze applicatie kun u in combinatie met de website van de blauwe sterrenwacht gebruiken om uw eigen observaties toe te voegen.";
        inleiding.setText(inleidingTekst);
        
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        
        // We vullen de actionbar 
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.observation, menu);
        return true;
        
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item){
        
        switch(item.getItemId()){
            case R.id.observation_add:
                
                // Gebruiker doorsturen naar hoofdmenu
                Intent i = new Intent(ActivityObservation.this, ActivityAddObservation.class);
                startActivity(i);
                
                break;
                
        }
        
        
        return true;
    }
    
}
